
function loaddata(){
	var allFlag = $("#allFlag").val();
	var pno = $("#pagenum").val();
	var emp_id = $("#emp_id").val();
	var ope_id=$("#ope_id_Ary").val();
	var month= $("#month").val();
	var classtype= $("#classtype").val();

	var url = pms_url + "ary/performance/getListWorkType";
	var params = {
			emp_id:emp_id,
			ope_id:ope_id,
			month:month,
			pno:pno,
			classtype:classtype,
			allFlag:allFlag
			};
	var obj = load(url,params);
	var worktypeArray = obj.worktype;
	$("#performanceMaintainMonlist").find("tbody").html("");
	$.each(worktypeArray, function(index, p) {
	var tr ="<tr role='row'>"+
	"<td align='center'>"+(index+1)+"</td>"+
	"<td align='center'>"+p.label+"</td>"+
	"<td align='center'>"+p.emp_id+"</td>"+
	"<td align='center'>"+p.emp_name+"</td>"+
	"<td align='center'>"+p.gender+"</td>"+
	"<td align='center'>"+((p.classtype==null)?"":p.classtype)+"</td>"+
	"<td align='center'>"+p.worktype_name+"</td>"+
	"<td align='center'>"+p.worktype+"</td>"+
	"</tr>";
	//alert(tr);
	$("#performanceMaintainMonlist").find("tbody").append(tr);
 });
}




$(function () { 
	
	loaddata();
	$("#btnSearch").click(function(){
		loaddata();
	});
	$("#btnReset").on('click', function () {
		$("#searchform input").val("");
		$("#ope_id").val("");
	});	
	
	
	$("#btnExport").on('click', function () {
		$("#performanceMaintainMonlist").tableExport({
		    headings: true, 
		    footers: true, 
		    formats: ["xls"],
		    fileName: "data",
		    bootstrap: true,
		    position: "bottom",
		    ignoreRows: null,
		    ignoreCols: null
		});   

	});	
	
	
  });